package com.mUI;

import android.app.AlertDialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.xike.kyt.R;
import com.xike.util.MyUtil;
import com.xike.util.StringUtil;

public class MessageDialog extends AlertDialog {

	Context context;
	TextView tv_name;
	TextView tv_delete;

	public MessageDialog(Context context) {
		super(context);
		this.context = context;
	}

	public MessageDialog(Context context, int theme) {
		super(context, theme);
		this.context = context;

	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.ui_message_dialog);
		tv_name = (TextView) findViewById(R.id.messageDialog_tv_name);
		tv_delete = (TextView) findViewById(R.id.messageDialog_tv_delete);
	}

	public void setUserName(String userName) {
		MyUtil.setTextViewText(tv_name, userName, 0, "提示");
	}

	public void setOnDeleteClickListener(View.OnClickListener listener) {
		tv_delete.setOnClickListener(listener);
	}

}
